-
Notifications
You must be signed in to change notification settings - Fork 156
Expose buildpack detection as a command #1622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Yeah I feel like the part that checks out the repo should be separate from here, can you make that change? |
e29063e
to
cc46ea3
Compare
Cleared that out and also added handling json output when multiple buildpacks are detected. Would you like me to add the relevant functionality to utilize this in the core buildpacks plugin? Or would you rather I create a separate plugin? |
It might be useful to add "url", "slug" (eg. "heroku/ruby") or even "version" (eg. "v321") to the json output, but I am not sure how to get these. If that makes sense, do you have any suggestions I can look into? |
I'd actually rather not have this tool expose json output. Mind removing that? The detected buildpack will be in the buildpack-url and the buildpack-version file: https://github.com/gliderlabs/herokuish/blob/master/buildpacks/buildpack-clojure/buildpack-url https://github.com/gliderlabs/herokuish/blob/master/buildpacks/buildpack-clojure/buildpack-version |
b0dc8a3
to
3a94afd
Compare
Cleared that up as well. It was optional and nice-to-have really, but I get it. Let me know if you'd rather have this functionality utilized in the core "buildpacks" dokku plugin (so we can run Thanks for the comments. |
Mind adding a test for this functionality? |
Tests added. Couldn't figure out how to handle a scenario when BUILDPACK_URL is set. |
- #1608 @dokku-bot: Update nodejs to version v310 - #1609 @dependabot: chore(deps): bump puma from 7.0.2 to 7.0.3 in /buildpacks/buildpack-ruby/tests/ruby-sinatra - #1610 @dokku-bot: Update gradle to version v46 - #1611 @dokku-bot: Update gradle to version v47 - #1612 @dokku-bot: Update go to version v213 - #1613 @dokku-bot: Update ruby to version v321 - #1614 @dokku-bot: Update gradle to version v48 - #1615 @dokku-bot: Update python to version v308 - #1616 @dokku-bot: Update python to version v309 - #1617 @dokku-bot: Update php to version v274 - #1618 @dependabot: chore(deps-dev): bump heroku/heroku-buildpack-php from 273 to 274 in /buildpacks/buildpack-php/tests/php - #1619 @dependabot: chore(deps): bump hadolint/hadolint-action from 3.2.0 to 3.3.0 - #1620 @dokku-bot: Update python to version v310 - #1621 @dependabot: chore(deps): bump puma from 7.0.3 to 7.0.4 in /buildpacks/buildpack-ruby/tests/ruby-sinatra - #1622 @Tashows Expose buildpack detection as a command - #1624 @dokku-bot: Update nodejs to version v313 - #1625 @dependabot: chore(deps): bump markupsafe from 3.0.2 to 3.0.3 in /buildpacks/buildpack-python/tests/python-flask - #1626 @dependabot: chore(deps): bump markupsafe from 3.0.2 to 3.0.3 in /buildpacks/buildpack-multi/tests/multi - #1627 @dokku-bot: Update ruby to version v322 - #1628 @dokku-bot: Update scala to version v100 - #1629 @dependabot: chore(deps-dev): bump heroku/heroku-buildpack-php from 274 to 275 in /buildpacks/buildpack-php/tests/php - #1630 @dokku-bot: Update python to version v311 - #1631 @dokku-bot: Update php to version v275 - #1632 @josegonzalez fix: use updated method of setting environment variables in Dockerfile - #1633 @dependabot: chore(deps-dev): bump heroku/heroku-buildpack-php from 275 to 276 in /buildpacks/buildpack-php/tests/php - #1634 @dokku-bot: Update python to version v312 - #1635 @dokku-bot: Update php to version v276 - #1636 @dependabot: chore(deps): bump rack from 3.2.1 to 3.2.2 in /buildpacks/buildpack-multi/tests/multi - #1637 @dependabot: chore(deps): bump rack from 3.2.1 to 3.2.2 in /buildpacks/buildpack-ruby/tests/ruby-sinatra - #1638 @dependabot: chore(deps): bump sinatra from 4.1.1 to 4.2.0 in /buildpacks/buildpack-ruby/tests/ruby-sinatra - #1639 @dependabot: chore(deps): bump sinatra from 4.1.1 to 4.2.0 in /buildpacks/buildpack-multi/tests/multi - #1640 @dokku-bot: Update go to version v214 - #1642 @dependabot: chore(deps): bump rack from 3.2.2 to 3.2.3 in /buildpacks/buildpack-multi/tests/multi - #1643 @dependabot: chore(deps): bump rack from 3.2.2 to 3.2.3 in /buildpacks/buildpack-ruby/tests/ruby-sinatra - #1644 @dokku-bot: Update ruby to version v324 - #1645 @dokku-bot: Update python to version v313 - #1646 @dokku-bot: Update nodejs to version v314
I am working on a feature and want to be able to call this via dokku. Ideally
dokku buildpacks:detect app_name
, alternatively via a custom plugin. Let me know which one would make more sense.Basically just needs to run something like this:
If this is moved into buildpacks (or a separate) plugin, then the part that checks out a potential bare git repo, could probably be moved there as well and just run before the command above. Not sure about permissions complications.